<template>
  <div class="test-container">
    <ImageLoader
      src="https://img2.baidu.com/it/u=175327901,886211028&fm=26&fmt=auto"
      placeholder="https://img1.baidu.com/it/u=3633409683,566717158&fm=253&fmt=auto&app=120&f=PNG?w=168&h=121"
      @load="handlerImageLoad"
      :duration="3000"
    />
  </div>
</template>

<script>
import ImageLoader from "./";
export default {
  components: {
    ImageLoader,
  },
  methods: {
    handlerImageLoad() {
      console.log("imageLoader组件中原图加载完成了");
    },
  },
};
</script>

<style scoped lang="less">
.test-container {
  width: 400px;
  height: 300px;
  margin: 0 auto;
  border: 2px solid;
}
</style>